import Taro, { Component } from '@tarojs/taro'
import { View, Image } from '@tarojs/components'
import { AtButton } from 'taro-ui'
import './fail.css'
import fail from '../../img/fail.png'
import app from '../../main';

export default class Fail extends Component {

  config = {
    navigationBarBackgroundColor: "#000000",
    navigationBarTextStyle: "white",
    navigationBarTitleText: ''
  }
  constructor(){
    super(...arguments)
  }


  go(){
      app.redirectTo('../Photograph/Photograph')
  }

  componentWillMount () {
    app.eyesphoto = ''
  }

  render () {
    return (
      <View className='image-text'>
        <View>
        <Image
          style='width: 50px;height: 50px;'
          src={fail}
        />
        </View>
        <View className='text'>
        离摄像头太远或眼睛没有睁开，使得眼睛过小
        </View>
        <View>
        <AtButton className='btn' onClick={this.go.bind(this)}>再试一次</AtButton>
        </View>
      </View>   
    )
  }
}     